home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume91 / utilitys / sman_1_1 / part01 / src / sless_defs.h < prev    next >
C/C++ Source or Header  |  1991-07-29  |  975b  |  49 lines

  1.  
  2. #define Prototype   extern
  3.  
  4. #include <exec/types.h>
  5. #include <libraries/dos.h>
  6.  
  7. #ifdef __DEBUG__
  8. #ifdef __TRACE__
  9. static const char __BaseFile[] = __BASE_FILE__;
  10. #define     show_line        reportline(__BaseFile,__LINE__)
  11. #else  (__TRACE__)
  12. #define     show_line
  13. #endif (__TRACE__)
  14. #else (__DEBUG__)
  15. #define     show_line
  16. #endif (__DEBUG__)
  17.  
  18.  
  19. #define VERSION     "1.1"
  20.  
  21. #define MAXLINE     400
  22.  
  23. #define makeconid(a,b)      ( ((short)(a) << 8) + (b) )
  24.  
  25. struct conreport {
  26.     short    conid;
  27.     int     args[8];
  28. };
  29.  
  30.  
  31.  
  32. #define getc(fp)        (((fp)->unget!=0x100||(fp)->pos>=(fp)->bufflen)?sgetc(fp):(fp)->buff[(fp)->pos++])
  33. #define seof(fp)        ((fp)->bufflen<=0)
  34. #define stell(fp)       ((fp)->filepos+(fp)->pos)
  35. #define ungetc(c,fp)    ((fp)->pos--,fp->unget=(c))
  36.  
  37. #define SEEK_SET    0
  38. #define SEEK_CUR    1
  39. #define SEEK_END    2
  40.  
  41. typedef struct file {
  42.     int     filepos,pos,bufflen;
  43.     BPTR    des;
  44.     short   unget;
  45.     char    *buff;
  46. } FILE;
  47.  
  48. #include "sless_proto.h"
  49.